package models.System.Headline;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2018-08-04.
 */
public class SystemUser {
    public int Id;
    public String title;

    public static List<SystemUser> list (){
        List<SystemUser> list = new ArrayList<SystemUser>();
        SystemUser systemUser = new SystemUser();
        systemUser.Id = 1;
        systemUser.title =SystemTitle.SystemUsersTemplate;
        list.add(systemUser);
        systemUser = new SystemUser();
        systemUser.Id = 2;
        systemUser.title =SystemTitle.SystemUsersCollection;
        list.add(systemUser);
        systemUser = new SystemUser();
        systemUser.Id = 3;
        systemUser.title =SystemTitle.SystemUsersRecovery;
        list.add(systemUser);
        return list;
    }

    public static String title(int id) {
        List<SystemUser> systemUsers = list();
        if (systemUsers.size()==0){
            return null;
        }
        for (SystemUser items:systemUsers) {
            if (items.Id==id){
                return items.title;
            }
        }
        return null;
    }
}
